Skip to content

DO NOT MERGE: Add optional title feature to ChartModule#1666

Closed
catherinedevlin wants to merge 1 commit intomesa:mainfrom
catherinedevlin:issue954
Closed

DO NOT MERGE: Add optional title feature to ChartModule#1666
catherinedevlin wants to merge 1 commit intomesa:mainfrom
catherinedevlin:issue954

Conversation

@catherinedevlin
Copy link
Copy Markdown
Contributor

Closes mesa/mesa-viz-tornado#23

Supersedes #955 - that code is fine, but old enough that rebasing with the current main seems hopeless.

Also, it includes an example that needs to be added to mesa-examples in a separate PR. When that PR is ready, will remove the "DO NOT MERGE" on this one.

Updated docs to point to mesa-examples

format fix
@catherinedevlin
Copy link
Copy Markdown
Contributor Author

I'm not able to make this work after all.

An experiment in https://github.com/projectmesa/mesa-examples/blob/main/examples/charts/charts/server.py is showing
elements.push(new ChartModule([{"Label": "Rich", "Color": "#2ca02c"}, {"Label": "Poor", "Color": "#d62728"}, {"Label": "Middle Class", "Color": "#1f77b4"}], 500, 200, 'sample line chart title'));

showing up in the javascript of the running example, but no resulting title text, and I don't know enough JavaScript to figure out why.

Also, even if it worked, it looks not only like ChartVisualization.py, but also BarChartVisualization.py and PieChartVisualization.py (mabye everything in visualization/modules) would need corresponding changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Option title for ChartModule

2 participants